<template>
  <div class="hello">
    <input type="text" v-model="userName">
    <input type="text" v-model="email">
    <input type="password" v-model="password">
    <button @click="getList">提交</button>
  </div>
</template>

<script>
export default {
  name: 'hello',
  data () {
    return {
      userName:'',
      password:'',
      email:''
    }
  },
  methods:{
    getList(){
      //http://localhost:3000/users/info
      this.$http.post('/users/info',{
        userName:this.userName,
        password:this.password,
        email:this.email
      }).then((res)=>{
        console.log(res)
      })
    }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h1, h2 {
  font-weight: normal;
}

ul {
  list-style-type: none;
  padding: 0;
}

li {
  display: inline-block;
  margin: 0 10px;
}

a {
  color: #42b983;
}
</style>
